<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

   <title>Problem E - Prime Words</title>
</head><body>

<h1 align="center">Problem E - Prime Words</h1>
<h3 align="center">Time Limit: 1 second</h3>

<div>
</div>

<p>
</p>

<p>
A prime number is a number that has only two divisors: itself and the number one.
Examples of prime numbers are: 1, 2, 3, 5, 17, 101 and 10007.
</p>

<p>
In this problem you should read a set of words, each word is composed only
by letters in the range <b>a-z</b> and <b>A-Z</b>. Each letter has a specific
value, the letter <b>a</b> is worth <b>1</b>, letter <b>b</b> is worth <b>2</b>
and so on until letter <b>z</b> that is worth <b>26</b>. In the same way, letter
<b>A</b> is worth <b>27</b>, letter <b>B</b> is worth <b>28</b> and letter
<b>Z</b> is worth <b>52</b>.
</p>

<p>
You should write a program to determine if a word is a prime word or not. A
word is a prime word if the sum of its letters is a prime number. 
</p>

<h2>Input</h2>

<p>
The input consists of a set of words. Each word is in a line by itself
and has <b>L</b> letters, where <b>1 ≤ L ≤ 20</b>. The input is
terminated by enf of file (EOF).
</p>

<h2>Output</h2>

<p>
For each word you should print: <b>It is a prime word.</b>, if the sum
of the letters of the word is a prime number, otherwise you should
print: <b>It is not a prime word.</b>.
</p>

<h2>Sample Input</h2>

<pre>UFRN
contest
AcM
</pre>

<h2>Sample Output</h2>

<pre>It is a prime word.
It is not a prime word.
It is not a prime word.
</pre>

<hr>

<b>Problem setter: S�rgio Queiroz de Medeiros</b>

</body></html>